﻿using System.Security;
using System;

namespace Co9320.NamaAlert.Extension.Model
{
    class TestSetting :ISetting
    {
        public TestSetting();

        public TestSetting(string userName, SecureString password)
        {
            this.userName = userName;
            this.password = password;
        }

        #region ISetting メンバ

        private string userName;
        public string UserName
        {
            get { return userName; }
            set
            {
                userName = value;
                OnChangedSetting(EventArgs.Empty);
            }
        }

        private SecureString password;
        public SecureString Password
        {
            get { return password; }
            set
            {
                password = value;
                OnChangedSetting(EventArgs.Empty);
            }
        }

        public event EventHandler ChangedSetting;

        #endregion

        protected void OnChangedSetting(EventArgs e)
        {
            if (ChangedSetting != null)
                ChangedSetting(this, e);
        }
    }
}
